<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); 

class CodexModel extends Model{
    function CodexModel(){
        Model::Model();
    }
    function _add($table,$data){
        return $this->db->insert($table,$data);
    }
    function _edit($table,$id,$data){
        $this->db->where($this->codexadmin->primary_key,$id);
        return $this->db->update($table,$data);
    }
    function delete($table,$id){
        return $this->db->delete($table, array($this->codexadmin->primary_key => $id));
    }
}

?>
